/*    */ package nc.codeplatform.framework.service;
/*    */ 
/*    */ import nc.bs.pub.compiler.AbstractCompiler2;
/*    */ import nc.impl.pubapp.pattern.rule.processer.CompareAroundProcesser;
/*    */ import nc.vo.pub.AggregatedValueObject;
/*    */ import nc.vo.pub.BusinessException;
/*    */ import nc.vo.pub.compiler.PfParameterVO;
/*    */ import nc.vo.pubapp.pattern.model.entity.bill.IBill;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public abstract class AbstractPfScriptAction<T extends IBill>
/*    */   extends AbstractCompiler2
/*    */ {
/*    */   public Object runComClass(PfParameterVO paraVO) throws BusinessException {
/* 23 */     this.m_tmpVo = paraVO;
/* 24 */     T[] clientFullVOs = (T[])(IBill[])getVos();
/*    */ 
/*    */ 
/*    */ 
/*    */     
/* 29 */     if (clientFullVOs != null && clientFullVOs.length > 0) {
/* 30 */       paraVO.m_preValueVo = (AggregatedValueObject)clientFullVOs[0];
/* 31 */       paraVO.m_preValueVos = (AggregatedValueObject[])clientFullVOs;
/*    */     } 
/*    */     
/* 34 */     before(paraVO);
/*    */     
/* 36 */     CompareAroundProcesser<T> processor = getAroundProcessor(paraVO);
/*    */     
/* 38 */     if (processor != null) {
/* 39 */       processor.before(clientFullVOs, clientFullVOs);
/*    */     }
/*    */     
/* 42 */     T[] bills = (T[])process(paraVO);
/*    */     
/* 44 */     handleProcessor(processor, clientFullVOs, clientFullVOs, bills);
/*    */     
/* 46 */     if (processor != null) {
/* 47 */       bills = (T[])(IBill[])processor.after(clientFullVOs, clientFullVOs);
/*    */     }
/*    */     
/* 50 */     after(paraVO, bills);
/*    */     
/* 52 */     return bills;
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/* 61 */   protected CompareAroundProcesser<T> getAroundProcessor(PfParameterVO paraVO) throws BusinessException { return null; }
/*    */   
/*    */   protected void handleProcessor(CompareAroundProcesser<T> processor, T[] clentBills, T[] originBills, T[] processBills) throws BusinessException {}
/*    */   
/*    */   protected void before(PfParameterVO paraVO) throws BusinessException {}
/*    */   
/*    */   protected abstract T[] process(PfParameterVO paramPfParameterVO) throws BusinessException;
/*    */   
/*    */   protected void after(PfParameterVO paraVO, T[] processBills) throws BusinessException {}
/*    */ }


/* Location:              E:\zhuhai_ncc\NCC2111\modules\lcdp\lib\publcdp_codebaseLevel-1.jar!/nc/codeplatform/framework/service/AbstractPfScriptAction.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.0.7
 */